package ${groupId}.${artifactId}.service.impl;

import java.util.List;
import java.util.Map;
import ${groupId}.${artifactId}.service.Abstract${service}Service;

import ${groupId}.${artifactId}.dao.${model}Dao;


import ${groupId}.${artifactId}.model.${model};

 
/**
 * Service Implement Class .
 * 
 * Created On ${createdTime}
 * @author Code Generator
 * @version $Id$
 */
public class ${service}ServiceImpl extends Abstract${service}Service{
	
		public ${model} get${model}(Integer id){
			return this.${model.lowerCaseFirst}Dao.findById(id);
		}
		
		public List<${model}> getAll(){
			return this.${model.lowerCaseFirst}Dao.getAll();
		}
		
		public ${model} update(${model} ${model.lowerCaseFirst}){
			return  this.${model.lowerCaseFirst}Dao.merge(${model.lowerCaseFirst});
		}
		
		public void save(${model} ${model.lowerCaseFirst}){
			this.${model.lowerCaseFirst}Dao.persist(${model.lowerCaseFirst});
		}
		
		public void delete(${model} ${model.lowerCaseFirst}){
			this.${model.lowerCaseFirst}Dao.delete(${model.lowerCaseFirst});
		}
		
		public List<${model}> getPage(int pageSize) {
			return this.${model.lowerCaseFirst}Dao.getPage(pageNumber, pageSize);
		}
		
		public Integer getTotalPageCount(int pageSize){
			return this.${model.lowerCaseFirst}Dao.getPageCount(pageSize, null, null);
		}
		
		public List<${model}> getPage(int pageNumber,int pageSize, String condition,Map<String,Object> params){
			return this.${model.lowerCaseFirst}Dao.getPage(pageNumber, pageSize, condition, params);
		}
		
		public Integer getPageCount(int pageSize, String condition,Map<String,Object> params){
			return this.${model.lowerCaseFirst}Dao.getPageCount(pageSize,condition, params);
		}
}